function myAjax(url, data, type) {
    let temp = null;
    $.ajax({
        url: 'http://localhost:8080' + url,
        data: JSON.stringify(data),
        type: type,
        dataType: 'json',
        // contentType:"application/x-www-form-urlencoded",
        contentType:"application/json;charset=utf-8",
        async:false,
        xhrFields: {
            withCredentials: true
        },
        success: function (ddd) {
            temp = ddd;
        }
    })
    return temp;
}
function myFileAjax(url, data, type) {
    let temp = null;
    $.ajax({
        url: 'http://localhost:8080' + url,
        data: data,
        type: type,
        dataType: 'json',
        async:false,
        contentType: false,
        enctype:"multipart/form-data",
        processData: false,
        xhrFields: {
            withCredentials: true
        },
        success: function (ddd) {
            temp = ddd;
        }
    })
    return temp;
}